<script language="javascript">
	function checknull()
	{
		var field=document.formlogin;
		//alert(checkvar.length);
		if(field.username.value==""){
			alert("กรุณากรอก username ด้วยค่ะ !!");
			field.username.focus();
			return false;
		}
		if(field.password.value==""){
			alert("กรุณากรอก password ด้วยค่ะ !!");
			field.password.focus();
			return false;
		}
	}
	function submit_form(){
		document.getElementById("form_logout").submit();
	}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<TABLE WIDTH="250" height="500" BORDER="0" CELLPADDING="0" CELLSPACING="0" style="margin-top:5px;">
	<TR>
		<TD width="5">&nbsp;</TD>
		<TD bgcolor="#FFFFFF" valign="top">
		<!-- Open Content -->
			<? if(trim($_COOKIE["login_username"]) == ""){?>
			<table border="0" width="200" cellpadding="0" cellspacing="0" align="center">
			  <tr><td height="10"><img src="../image/menu_online_t.jpg" height="10" width="200"/></td>
			  </tr>
              
              <tr bgcolor="#FFFFFF">
			  	<td background="../image/m_online_m.jpg">
                <table border="0" width="97%" class="font_normal" >
                  <tr>
                    <td align="left"><b>สวัสดี</b></td>
                    <td align="right">Online</td>
                  </tr>
                  <tr>
                    <td align="left" colspan="2"><b>
                      บุคคลทั่วไป
                    </b></td>
                  </tr>
                  <tr>
                    <td align="left"><b>IP : </b></td>
                    <td align="right"><?=$_SERVER["REMOTE_ADDR"];?></td>
                  </tr>
                </table> 
				</td>
              </tr>
            <tr><td height="8"><img src="../image/menu_online_b.jpg" height="8" width="200"/></td>
            </tr>
			</table>
			<? }?>
			<br />        
        	<? 
				if(trim($_COOKIE["login_username"]) != ""){ 
			?>
            <table border="0" width="185" cellpadding="0" cellspacing="0" align="center">
			  <tr><td height="10"><img src="../image/menu_online_t.jpg" height="10" width="200"/></td>
			  </tr>
              
              <tr bgcolor="#FFFFFF">
			  	<td background="../image/m_online_m.jpg">
                <table border="0" width="97%" class="font_normal" >
                  
                  <tr>
                    <td align="left"><b>สวัสดี</b></td>
                    <td align="right">Online&nbsp;&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="left" colspan="2">
                    <b><font color="#0000FF"><?=$_COOKIE["login_realname"];?></font></b>
                    </td>
                  </tr>
                  <tr>
                    <td align="left"><b>IP : </b></td>
                    <td align="right"><?=$_SERVER["REMOTE_ADDR"];?></td>
                  </tr>
                </table> 
				</td>
              </tr>
            <tr><td height="8"><img src="../image/menu_online_b.jpg" height="8" width="200"/></td>
            </tr>
			</table>
            <br />
			<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="margin-top:5;">
            <!--<tr>
            	<td height="70"><img  src="../image/menu_welcome.jpg" /></td>
            </tr>-->
                <tr>
					<td height="20" align="left" style="cursor:pointer;" onmouseover="this.style.background='#c4fc67'" onmouseout="this.style.background='#FFFFFF'" title="ข้อมูลส่วนตัวสมาชิก" onclick="location=('member_bizit.php');" class="font_topic1">
						&nbsp;&nbsp;<img src="../image/a19.gif" />&nbsp;&nbsp;ข้อมูลสมาชิกเว็บ&nbsp;BizIT</td>
			  </tr>
              
              <tr>
              	<td><img src="../image/menu_line.jpg" /></td>
              </tr>

				<tr>
					<td height="20" align="left" style="cursor:pointer;" onmouseover="this.style.background='#c4fc67'" onmouseout="this.style.background='#FFFFFF'" title="ลงทะเบียนเข้าร่วมงาน" onclick="location=('register_topic.php');" class="font_topic1">
						&nbsp;&nbsp;<img src="../image/a19.gif" />&nbsp;&nbsp;ข้อมูลการลงทะเบียนเข้างาน</td>
			  </tr>
           
              <tr>
              	<td><img src="../image/menu_line.jpg" /></td>
              </tr>
                <tr>
					<td height="20" align="left" style="cursor:pointer;" onmouseover="this.style.background='#c4fc67'" onmouseout="this.style.background='#FFFFFF'" title="ออกจากระบบ" onclick="submit_form();" class="font_topic1">
						&nbsp;&nbsp;<img src="../image/a19.gif" />&nbsp;&nbsp;ออกจากระบบ</td>
			  </tr>
              <tr>
              	<td><img src="../image/menu_line.jpg" /></td>
              </tr>
              <tr>
              	<td><form id="form_logout" method="post" action="chklogin.php"><input type="hidden" name="chk_login" value="logout"/></form></td>
              </tr>
              
				<? 
					}
				?>
		  </table><br />
		  <? if(trim($_COOKIE["user_name"]) != ""){?>
			
			<? }?>
		<!-- Close Content -->		</TD>
		<TD width="13" rowspan="2" background="../image/blank.gif"></TD>
	</TR>
	<TR>
		<TD width="5" height="8">&nbsp;</TD>
		<TD height="8">&nbsp;</TD>
	</TR>
</TABLE>